package mlz.b_constructor;

public class StudentDemo01 {
    public static void main(String[] args) {
        Student stu1 = new Student();
        stu1.age = 18;
        stu1.name = "张三";
        //调用成员方法
        stu1.eat();
        //stu1.Student();
        System.out.println(stu1.age);//18
        System.out.println(stu1.name);//张三

        Student stu3 = new Student();
        stu3.age = 20;
        stu3.name = "王五";
        System.out.println(stu3.age);//18
        System.out.println(stu3.name);//张三

        Student stu2 = new Student(30, "赵六");
        System.out.println(stu2.age);//0 30
        System.out.println(stu2.name);//null  赵六
    }
}
